/////////////////////////////////////////////////////////////////////////////////////////////
// Filename: EntityManager.h
// (c) Dave Ottley, 2012. All rights reserved.
/////////////////////////////////////////////////////////////////////////////////////////////
#ifndef ENTITYMANAGER_H
#define ENTITYMANAGER_H

///////////////////////////
//		INCLUDES
///////////////////////////
#include <map>
#include <stdint.h>

///////////////////////////
//		MY INCLUDES
///////////////////////////


class BaseGameEntity;

#define EntityMgr EntityManager::GetInstance()

class EntityManager
{
private:
	typedef std::map<uint32_t, BaseGameEntity*> EntityMap;

	EntityMap mEntityMap;

	EntityManager() {}
	EntityManager(const EntityManager&);
	EntityManager& operator=(const EntityManager&);
	
public:

	static EntityManager * GetInstance();
	BaseGameEntity* GetEntityFromID(uint32_t id) const;
	void RegisterEntity(BaseGameEntity * newEntity);
	void RemoveEntity(BaseGameEntity * entity);
	void Reset() { mEntityMap.clear(); }
};


#endif // ENTITYMANAGER_H